Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DataDog: Check for response object before returning the generic error #4259

Merged
merged 3 commits into from
Feb 22, 2023

Conversation

arapulido
Copy link
Contributor

@arapulido arapulido commented Feb 21, 2023

The Datadog API now creates a generic error object when returning a 429.

This fix checks the response object before the error object to craft a more complete error when reaching too many requests.

Checklist

- [ ] When introducing a new scaler, I agree with the scaling governance policy
- [ ] I have verified that my change is according to the deprecations & breaking changes policy
- [ ] Tests have been added

  • Changelog has been updated and is aligned with our changelog requirements
    - [ ] A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
    - [ ] A PR is opened to update the documentation on (repo) (if applicable)
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #4187

Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Signed-off-by: Ara Pulido <ara.pulido@datadoghq.com>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

CHANGELOG.md Outdated
@@ -82,6 +82,7 @@ Here is an overview of all new **experimental** features:
- **Kafka Scaler**: Support 0 in activationLagThreshold configuration ([#4137](https://github.com/kedacore/keda/issues/4137))
- **Prometheus Metrics**: Expose Prometheus Metrics also when getting ScaledObject state ([#4075](https://github.com/kedacore/keda/issues/4075))
- **Redis Scalers**: Fix panic produced by incorrect logger initialization ([#4197](https://github.com/kedacore/keda/issues/4197))
- **Datadog Scaler**: Return correct error when getting a 429 error ([#4187](https://github.com/kedacore/keda/issues/4187))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit, could you please sort this alphabetically?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@zroubalik
Copy link
Member

zroubalik commented Feb 21, 2023

/run-e2e datadog*
Update: You can check the progress here

@zroubalik zroubalik changed the title Check for response object before returning the generic error DataDog: Check for response object before returning the generic error Feb 21, 2023
@zroubalik
Copy link
Member

Thanks for the fix @arapulido !

@zroubalik zroubalik merged commit 8e7169d into kedacore:main Feb 22, 2023
@arapulido arapulido deleted the fix_4187 branch March 28, 2023 13:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataDog scaler outputs wrong log when getting 429 responses
2 participants